package com.bestcem.xm.user.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 是否完善信息
 *
 * @author zhijian.lin <zhijian.lin@idiaoyan.com>
 * @version v1.0
 * @date 2022/3/4 10:47
 */
@Getter
@AllArgsConstructor
public enum OrgCompleteFlagEnum {

    NO_COMPLETE(0, "不是"),
    COMPLETE(1, "是"),
    ;

    private final Integer type;

    private final String desc;

    /**
     * 通过type获取
     *
     * @param type
     * @return
     */
    public static OrgCompleteFlagEnum getByType(Integer type) {
        if (type != null) {
            for (OrgCompleteFlagEnum value : values()) {
                if (value.getType().equals(type)) {
                    return value;
                }
            }
        }
        return null;
    }


}
